package edu.nf.ch04.service;

import edu.nf.ch04.entity.User;
import edu.nf.ch04.mapper.UserMapper;
import edu.nf.ch04.util.MybatisUtils;
import org.apache.ibatis.annotations.Param;

/**
 * @author CSY
 * @date 2025 - 04 - 23
 */
public class UserService {
    public User getUserById(int id) {
        return MybatisUtils.getSqlSession()
                .getMapper(UserMapper.class)
                .getUserById(id);
    }

    public User getUser(int id,String name) {
        return MybatisUtils.getSqlSession()
                .getMapper(UserMapper.class)
                .getUser(id,name);
    }
}
